<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>layuiAdmin 网站用户 iframe 框</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link id="layuicss-layer" rel="stylesheet"
          href="https://www.layui.com/admin/std/dist/layuiadmin/layui/css/modules/layer/default/layer.css?v=3.1.1"
          media="all">
</head>
<body layadmin-themealias="default">

<form class="layui-form" action="">
    <div class="layui-inline">
        <label class="layui-form-label">物业类型</label>
        <div class="layui-input-inline">
            <select name="typeId" lay-verify="required" lay-search="">
                <option value="0">请选择</option>
                <option th:each="wu:${wuYeList}" th:value="${wu.id}" th:text="${wu.type}"></option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">金额</label>
        <div class="layui-input-inline">
            <input type="text" name="money" lay-verify="required" placeholder="请输入缴费金额" autocomplete="off"
                   class="layui-input">
        </div>
    </div>



    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit="" lay-filter="demo1" id="LAY-user-front-submit" value="确认">
    </div>
</form>

<script src="../../../layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'upload'], function () {
        var $ = layui.$
            , form = layui.form
            , upload = layui.upload,
            layer = layui.layer;

        form.on('submit(demo1)', function (data) {
            $.ajax({
                url: '/payWuYe',
                type: "post",
                dataType: "json",
                data: {
                    typeId: data.field.typeId,
                    money: data.field.money
                },
                success: function (msg) {
                    var code = msg.code;
                    if (code == 200) {
                        layer.closeAll('loading');
                        layer.load(2);
                        layer.msg("缴费成功", {icon: 6});
                        setTimeout(function () {
                            window.parent.location.reload();
                        }, 1000);
                    }

                }


            });
            return false;

        });
    });
</script>


<style id="LAY_layadmin_theme">.layui-side-menu, .layadmin-pagetabs .
layui-tab-title li:after, .layadmin-pagetabs .layui-tab-title li.layui-this:after, .layui-layer-admin
.layui-layer-title, .layadmin-side-shrink .layui-side-menu .layui-nav >
.layui-nav-item > .layui-nav-child {
    background-color: #20222A !important;
}

.layui-nav-tree .layui-this, .layui-nav-tree .layui-this > a, .layui-nav-tree .layui-nav-child
dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a {
    background-color: #009688 !important;
}

. layui-layout-admin .layui-logo {
    background-color: #20222A !important;
}
</style>
</body>
</html>